package lab1;

public class ChickenEggBuilder extends MealBuilder{
    @Override
    public void washVegetable() {
        System.out.println("正在洗菜。。。");
    }

    @Override
    public void addRice() {
        Item i = new ChickenRice();
        meal.addItem(i);
        System.out.println("添加："+i.getItemName());
    }

    @Override
    public void addSoup() {
        Item i = new EggSoup();
        meal.addItem(i);
        System.out.println("添加："+i.getItemName());
    }

    @Override
    public void taste(Taste[] taste) {
        meal.getItems().get(0).setTaste(taste[0]);
        meal.getItems().get(1).setTaste(taste[1]);
    }

    @Override
    public void cook() {
        System.out.println("正在烹饪。。。");
        meal.print();
    }

    @Override
    public void pack() {
        System.out.println("正在包装。。。");
        System.out.println("当前价格为："+meal.calculatePrice());
    }

    @Override
    public Meal getMeal() {
        return meal;
    }
}
